{% extends "base.html" %}
{% block title %}rank{% endblock %}
{% block head %}
<script src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>
 <link href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css" rel="stylesheet">
{% endblock %}

{% block content %}


<!-- 搜索区域  -->
<div class="container">

 <table id="example" class="display" style="width:100%;">
        <thead >
            <tr>
				<th style="padding-left:120px;font-family:inherit">Name</th>
                <th style="text-align: center;">score_rank</th>
                <th style="text-align: center;">贡献度</th>
                <th style="text-align: center;">活跃度</th>
                <th style="text-align: center;">影响力</th>
                <th style="text-align: center;">项目经验</th>
				<th style="text-align: center;">语言能力</th>
                <th style="text-align: center;">用户画像</th>
            </tr>
        </thead>
        <tbody>
      {% for user in rank_list%}
      <tr>

				<th style="padding-left:120px;">
   <span class="image">
			  	<img src="../static/image/{{user.login}}.gif" alt="{{user.login}}" class width="20" height="20">
		  </span>
					{{user.login}}
				</th>
                <th style="text-align: center;">{{user.score_rank}}</th>
                <th style="text-align: center;">{{user.commit_rank}}</th>
                <th style="text-align: center;">{{user.issue_rank}}</th>
                <th style="text-align: center;">{{user.follow_rank}}</th>
                <th style="text-align: center;">{{user.repos_rank}}</th>
				<th style="text-align: center;">{{user.languages_rank}}</th>
                <th style="text-align: center;">
                    <form action = "../users/" method = "post">
			{% csrf_token %}
				<button name="content" value="{{user.login}}">
					 <svg viewBox="0 0 16 16" version="1.1" width="12" height="12">
          <path fill-rule="evenodd" d="M16 12.999c0 .439-.45 1-1 1H7.995c-.539 0-.994-.447-.995-.999H1c-.54 0-1-.561-1-1 0-2.634 3-4 3-4s.229-.409 0-1c-.841-.621-1.058-.59-1-3 .058-2.419 1.367-3 2.5-3s2.442.58 2.5 3c.058 2.41-.159 2.379-1 3-.229.59 0 1 0 1s1.549.711 2.42 2.088C9.196 9.369 10 8.999 10 8.999s.229-.409 0-1c-.841-.62-1.058-.59-1-3 .058-2.419 1.367-3 2.5-3s2.437.581 2.495 3c.059 2.41-.158 2.38-1 3-.229.59 0 1 0 1s3.005 1.366 3.005 4z"></path>
        </svg>
				</button>
            </form>
                </th>
            </tr>
	{% endfor %}

        </tbody>
    </table>

  </div>
<script type="text/javascript">
     $(document).ready(function() {
        $('#example').DataTable();
    } );
 </script>
{% endblock %}